Skip to content

Bump batched MoE BLOCK_M from 16 to 64 on top of persistent kernel#19221

Draft
Gasoonjia wants to merge 1 commit intopersistent-on-hoistfrom
block-m-64-on-persistent
Draft

Bump batched MoE BLOCK_M from 16 to 64 on top of persistent kernel#19221
Gasoonjia wants to merge 1 commit intopersistent-on-hoistfrom
block-m-64-on-persistent

Conversation

@Gasoonjia
Copy link
Copy Markdown
Contributor

Microbenchmarked on Qwen3.5 MoE prefill (M=1696, top_k=8, 256 experts):
BLOCK_M=16: 3.62 ms
BLOCK_M=32: 2.85 ms (1.27x)
BLOCK_M=64: 2.75 ms (1.32x)

E2E (Qwen3.5-35B-A3B prefill, --moe-activation-dtype int8 --dense-prefill dequant --cuda_graph, p=1600 d=512, run_1..5 median):
BLOCK_M=16: 5897 tok/s prefill (273 ms), 98.1 tok/s decode
BLOCK_M=64: 6793 tok/s prefill (237 ms), 98.1 tok/s decode
Speedup: 1.152x prefill, decode unchanged (decode uses non-batched
fused_moe kernel)

Outputs are bit-identical between BLOCK_M=16 and BLOCK_M=64 in the microbenchmark (max abs diff = 0).

Microbenchmarked on Qwen3.5 MoE prefill (M=1696, top_k=8, 256 experts):
  BLOCK_M=16: 3.62 ms
  BLOCK_M=32: 2.85 ms (1.27x)
  BLOCK_M=64: 2.75 ms (1.32x)

E2E (Qwen3.5-35B-A3B prefill, --moe-activation-dtype int8 --dense-prefill
dequant --cuda_graph, p=1600 d=512, run_1..5 median):
  BLOCK_M=16: 5897 tok/s prefill (273 ms), 98.1 tok/s decode
  BLOCK_M=64: 6793 tok/s prefill (237 ms), 98.1 tok/s decode
  Speedup:    1.152x prefill, decode unchanged (decode uses non-batched
              fused_moe kernel)

Outputs are bit-identical between BLOCK_M=16 and BLOCK_M=64 in the
microbenchmark (max abs diff = 0).
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Apr 30, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19221

Note: Links to docs will display an error until the docs builds have been completed.

❌ 8 New Failures, 6 Cancelled Jobs

As of commit 015476d with merge base cb4e5ae (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant